package cn.schoolwow.ams.module.initial.service;

import cn.schoolwow.ams.module.block.form.initial.service.InitialFormBlockListFlow;
import cn.schoolwow.ams.module.block.listBlock.clazzBlock.initial.service.InitialClazzListBlockListFlow;
import cn.schoolwow.ams.module.block.listBlock.daoBlock.databaseTable.initial.service.InitialDatabaseTableListBlockListFlow;
import cn.schoolwow.ams.module.block.listBlock.daoBlock.entityTable.initial.service.InitialEntityTableListBlockListFlow;
import cn.schoolwow.ams.module.initial.flow.CheckInitialAMSContextExistFlow;
import cn.schoolwow.ams.module.initial.flow.GetAMSRouterMenuArrayFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class InitialAMSContextCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new CheckInitialAMSContextExistFlow())
                .next(new InitialClazzListBlockListFlow())
                .next(new InitialDatabaseTableListBlockListFlow())
                .next(new InitialEntityTableListBlockListFlow())
                .next(new InitialFormBlockListFlow())
                .next(new GetAMSRouterMenuArrayFlow());
    }

    @Override
    public String name() {
        return "初始化AMS上下文信息";
    }
}
